package com.zl.lib_base.paging.tools

import com.zl.lib_base.paging.DifferData

/**
 * @Description: 字符串数据
 * @Author: ZL
 * @CreateDate: 2021/12/4 14:30
 */
data class StringData(
    val string: CharSequence
) : DifferData {
    override fun areItemsTheSame(data: DifferData): Boolean {
        return (data as? StringData)?.string == string
    }

    override fun areContentsTheSame(data: DifferData): Boolean {
        return (data as? StringData)?.string == string
    }

    override fun toString(): String {
        return string.toString()
    }
}